<?php

use Illuminate\Support\Facades\Route;
use Illuminate\Http\Request;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/

Route::any('{any}', function (Request $request) {
    $path =$request->path();
    $path=substr($path,0,3);
    if($path=='web' || $path=='/'){
        return view('welcome');  
    }else{
        return response()->json(['code'=>0,'msg'=>'无效API请求2'.$path]);
    }
})->where('any', '.*');

